import moment from '../../../utils/moment.js'
var app = getApp()
Page({
	data: {
		balance:'',
		balanceDetail:[]
	},
	onLoad: function (options) {
		app.getMemInfo().then(res=>{
			this.setData({
				accountId:res.data.id
			})
			this.balance(res.data.id)
		})
	},
	balance(accountId){
		let data = {
			accountId
		}
		app.request('wx_app/agent/account/getByid',data,'GET').then(res=>{
			console.log(res)
			let list = res.data.agentStatementsList.reverse()
			list.forEach(item=>{
				
			})
			this.setData({
				balance:res.data.agent.accountBalance,
				balanceDetail:list
			})
		})
	}
})